<%--
  Created by IntelliJ IDEA.
  User: 86180
  Date: 2022/8/19
  Time: 14:05
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<html>
<head>
    <script src="../js/jquery.min.js"></script>
    <script src="../js/bootstrap.min.js"></script>
    <title>修改商品</title>
</head>
<body>

<%--<c:if test="${admin==null }">--%>
<%--    <c:redirect url="login.jsp"></c:redirect>--%>
<%--</c:if>--%>
<form action="${pageContext.request.contextPath }/product?method=update" method="post">
    <input type="text" name="id" value="${goods.id}" /><br/>
    <input type="text" name="name" value="${goods.name}"/><br/>
    <input type="text" name="picture" value="${goods.picture}"/><br/>
    <input type="text" name="price" value="${goods.price}"/><br/>
    <input type="text" name="intro" value="${goods.intro}"/><br/>
    <select name="typeId">
        <option value="${goods.tbGoodsType.id}" >${goods.tbGoodsType.name}</option>
        <c:forEach items="${goodsTypeList}" var="type">
            <c:if test="${type.level <=2}">
                <option value="${type.id }">${type.name}</option>
            </c:if>
        </c:forEach>
    </select><br/>
    <button type="submit" class="btn btn-default">修改</button>

</form>

</body>
</html>
